package pers.zb.cloud.service.upms.entity;


import lombok.Data;
import pers.zb.cloud.service.upms.enums.MenuShape;
import pers.zb.cloud.service.upms.enums.MenuType;
import pers.zb.cloud.service.upms.enums.PermissionStatus;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 权限
 */
@Data
@Table(name = "sys_permission")
public class SysPermission {
	@Id
	@Column(name = "id")
	private Long id; //主键ID

	@Column(name = "name")
	private String name; //权限名称

	@Column(name = "code")
	private String code;//权限代码

	@Column(name = "pid")
	private Long pid; //权限父节点ID

	@Column(name = "client_id")
	private String clientId; //所属应用

	@Column(name = "status")
	private PermissionStatus status;//权限状态 1 - 可用 ， 2 - 禁用

	/*@Column(name = "client_module")
	private Long clientModule;//所属应用的模块（引用sys_menu表的主键）*/

	@Column(name = "icon")
	private String icon;//菜单图标

	@Column(name = "type")
	private MenuType type;//菜单类型

	@Column(name = "shape")
	private MenuShape shape;//是否拥有子节点的标识

	@Column(name = "description")
	private String description;//说明

	@Column(name = "create_time")
	private Date createTime; //创建时间

	@Column(name = "update_time")
	private Date updateTime; //最后更新时间
}
